package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.AccessLevel;
import lombok.Data;
import lombok.experimental.FieldDefaults;

import java.io.File;
import java.time.LocalDateTime;

/**
 * 协议
 */
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
@TableName("agreement")
public class Agreement {
    @Column(name = "id",isKey = true,isAutoIncrement = true)
    Long id;

    /**
     * 关键字
     */
    @Column(name = "keyword",comment = "关键字")
    String keyword;

    /**
     * 文本
     */
    @Column(name = "text",type = MySqlTypeConstant.MEDIUMTEXT,comment = "文本")
    String text;

    /**
     * 创建时间
     */
    @Column(name = "creation_time")
    @TableField(fill = FieldFill.INSERT)
    LocalDateTime creationTime;

    /**
     * 更新时间
     */
    @Column(name = "last_modification_time")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
